//
//  LBSemaphoneController.m
//  TEXT
//
//  Created by liubo on 2023/9/17.
//  Copyright © 2023 刘博. All rights reserved.
//

#import "LBSemaphoneController.h"

@interface LBSemaphoneController ()

@property (nonatomic, strong) dispatch_semaphore_t semaphore;

@end

@implementation LBSemaphoneController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.semaphore = dispatch_semaphore_create(0);
    
    dispatch_semaphore_signal(self.semaphore);
    
    long semaphoreTime =  dispatch_semaphore_wait(self.semaphore, dispatch_time(DISPATCH_TIME_NOW, 2000 * NSEC_PER_MSEC));
    
    NSLog(@"哈哈哈数量数量%ld", semaphoreTime);
    
    // Do any additional setup after loading the view.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
